<template>
  <div class="page_footer">
    <!--<hr>-->
    <div class="container">
      <div class="row">
        <div class="col-md-12"><p>&copy; BlogWu 2017</p></div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'Footer',
    data () {
      return {
        msg: 'Welcome to Your Vue.js App'
      }
    }
  }
  $(function(){
    function footerPosition(){
      $(".page_footer").removeClass("fixed-bottom");
      var contentHeight = document.body.scrollHeight,//网页正文全文高度
        winHeight = window.innerHeight;//可视窗口高度，不包括浏览器顶部工具栏
      if(!(contentHeight > winHeight)){
        // 当网页正文高度小于可视窗口高度时，为footer添加类fixed-bottom
        $("footer").addClass("fixed-bottom");
      }
    }
    footerPosition();
    $(window).resize(footerPosition);
  })
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
